#pragma once

#ifndef ATLASSERT
#define ATLASSERT	ASSERT
#endif

class CUtility
{
public:
	static CString GetModulePath(HMODULE hModule = NULL);

	static BOOL IsFileExist(LPCTSTR lpszFilePath);

	static BOOL ExtractResourceToFile( LPCTSTR lpszType
									, UINT nResID
									, LPCTSTR lpszFilename
									, HMODULE hModule
									);

	static Image * LoadImage( UINT nID, LPCTSTR lpszType, HINSTANCE hInstance = NULL);
};

CString GetDate(LPTSTR fmt = "%04d%02d%02d");
CString GetTime(LPTSTR fmt = "%02d%02d%02d");
void TraceLog(char *pCFile, int iCLine, char *pFmt, ...);
BOOL MStrTok(const char* src, const char *sep, int srcLen, int sepLen, CStringArray &sa);